<template>
  <avue-crud :option="option"
             :data="data"
             @search-change="searchChange"
             @search-reset="resetChange">
  </avue-crud>
</template>
<script>
export default {
  data () {
    return {
      data: [{
        name: '张三'
      }],
      option: {
        column: [{
          label: '姓名',
          prop: 'name',
          search: true,
        }]
      }
    }
  },
  methods: {
    resetChange (item) {
      this.$message.success('清空回调')
    },
    searchChange (params, done) {
      this.$message.success('2s后关闭锁定')
      setTimeout(() => {
        done();
        this.$message.success(JSON.stringify(params));
      }, 2000)

    }
  }
}
</script>